package com.yf.cmw.dao;

import android.content.Context;

import com.base.common.util.DBHelper;


public abstract class BaseDao<T> {
   protected DBHelper dbHelper = null;

    public BaseDao(Context context){
        dbHelper = new DBHelper(context);
        String dropSql = dropTabSql();
        if(null != dropSql && !dropSql.equals("")){
            dbHelper.setDropTabSql(dropSql);
        }
        String sql = getCreateTabSql();
        dbHelper.setCreateTabSql(sql);
    }

    protected abstract String getCreateTabSql();

    protected abstract String dropTabSql();
}

